import request from '@/utils/request'


export default {
  //根据书库分页获取连载中书库内容
  getNovelByState(house,state,current,size,text) {
    return request({
      url: `/novel/sirius-novel/getNovelByState/${house}/${state}/${current}/${size}/${text}`,
      method: 'get'
    })
  },
  //添加新书精选
  setNewSelected(multipleSelection){
    return request({
      url: `/novel/sirius-novel/setNewSelected`,
      method: 'post',
      data: multipleSelection
    })
  },
  //根据书库分页获取全部书库内容
  getPopularityNovelByState(house,current,size,text){
    return request({
      url: `/novel/sirius-novel/getPopularityNovelByState/${house}/${current}/${size}/${text}`,
      method: 'get'
    })
  },
  //添加人气精选
  setPopularitySelected(houseMap){
    return request({
      url: `/novel/sirius-novel/setPopularitySelected`,
      method: 'post',
      data: houseMap
    })
  },
  //逻辑删除部分小说
  delNovels(novels){
    return request({
      url: `/novel/sirius-novel/delNovels`,
      method: 'post',
      data: novels
    })
  },
  //逻辑删除某本小说
  delNovelById(novelId,state){
    return request({
      url: `/novel/sirius-novel/delNovelById/${novelId}/${state}`,
      method: 'post'
    })
  },
  //根据小说id获取小说
  getNovelById(id){
    return request({
      url: `/novel/sirius-novel/getNovelById/${id}`,
      method: 'get'
    })
  },
  //修改小说的基本数据
  updateNovel(novel){
    return request({
      url: `/novel/sirius-novel/updateNovelById`,
      method: 'post',
      data : novel
    })

  }
}
